package com.woniuxy.common.mapper;

import com.woniuxy.common.entity.ForumTopic;
import com.woniuxy.common.entity.ForumTopicExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ForumTopicMapper {
    long countByExample(ForumTopicExample example);

    int deleteByExample(ForumTopicExample example);

    int deleteByPrimaryKey(String id);

    int insert(ForumTopic record);

    int insertSelective(ForumTopic record);

    List<ForumTopic> selectByExampleWithBLOBs(ForumTopicExample example);

    List<ForumTopic> selectByExample(ForumTopicExample example);
    //cont模糊搜索
    List<ForumTopic> selectByLike(String find);

    ForumTopic selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") ForumTopic record, @Param("example") ForumTopicExample example);

    int updateByExampleWithBLOBs(@Param("record") ForumTopic record, @Param("example") ForumTopicExample example);

    int updateByExample(@Param("record") ForumTopic record, @Param("example") ForumTopicExample example);

    int updateByPrimaryKeySelective(ForumTopic record);

    int updateByPrimaryKeyWithBLOBs(ForumTopic record);

    int updateByPrimaryKey(ForumTopic record);

    //指定社区 最新消息 支持like
    List<ForumTopic> findLikeNew(@Param("id")String id, @Param("find")String find);
    //最热话题
    List<ForumTopic> findLikeHot(@Param("id")String forumId, @Param("find")String find);
    //最多收藏
    List<ForumTopic> findLikeCollect(@Param("id")String forumId, @Param("find")String find);
}